// @ts-ignore
/* eslint-disable */
import request from '@/utils/request.ts'

/** 此处后端没有提供注释 POST /permission/addMenu */
export async function addMenu(body: API.SysPermission, options?: { [key: string]: any }) {
  return request<API.BaseResponseString>('/permission/addMenu', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /permission/allMenu */
export async function getAllMenu(options?: { [key: string]: any }) {
  return request<API.BaseResponseListSysPermission>('/permission/allMenu', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 DELETE /permission/deleteMenu/${param0} */
export async function deleteMenu(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteMenuParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.BaseResponseString>(`/permission/deleteMenu/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /permission/getMenuById/${param0} */
export async function getMenuById(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getMenuByIdParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.BaseResponseSysPermission>(`/permission/getMenuById/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /permission/getUserMenu */
export async function getUserMenu(options?: { [key: string]: any }) {
  return request<API.BaseResponseListSysPermission>('/permission/getUserMenu', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /permission/updateMenu */
export async function updateMenu(body: API.SysPermission, options?: { [key: string]: any }) {
  return request<API.BaseResponseString>('/permission/updateMenu', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
